{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Part 1: Review the online programming.\n",
    "    ----done in lesson_03.ipynb"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Part 2: Change loss function from $loss = \\frac{1}{n}\\sum{(y_i - \\hat(y_i))^2}$ to $loss = \\frac{1}{n}\\sum{|y_i - \\hat{y_i}|}$, and using your mathmatical knowledge to get the right partial formual. Implemen the gradient descent code.\n",
    "    ----changed and finished in Assignment_02.ipynb"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Part 3: Finish the Solution Parse Part of Edit-Distance\n",
    "    ----practiced in lesson_03.ipynb"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Part 4: Review machine learning"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "1. Why do we use Derivative / Gradient to fit a target function?¶"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Ans:  梯度表示函数在该点处沿着该方向变化最快。我们通过获取梯度，并不断调整，就可以迅速的实现接近我们需要的目标函数值。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "2. In the words 'Gradient Descent', what's the Gradient and what's the Descent?¶"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Ans:  在微积分里面，对多元函数的参数求∂偏导数，把求得的各个参数的偏导数以向量的形式写出来，就是梯度。在最小化损失函数时，可以通过梯度下降法来一步步的迭代求解，得到最小化的损失函数和模型参数值。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "3. What's the advantages of the 3rd gradient descent method compared to the previous methods?"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Ans:  通过梯度，函数可以预知函数值的方向，更好的做出调节，如果次数足够多，可以得出很接近的最优解。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "4. Using the simple words to describe: What's the machine leanring.¶"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Ans: 利用大量数据及数学工具，让计算机帮我们找出最优决策。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Part 5: Answer following questions: "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "1. Why do we need dynamic programming? What's the difference of dynamic programming and previous talked `search` problem? "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Ans: 动态规划是求解决策过程最优化的数学方法。把多阶段过程转化为一系列单阶段问题。动态规划可以明显降低计算机的重复与无用计算，节省时间。   \n",
    "差别：search介绍了广度和深度搜索，每个节点的是否访问都会对后续造成给一定影响。而动态规划具有无后效性。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "2. Why do we still need dynamic programming? Why not we train a machine learning to fit a function which could get the `right` answer based on inputs?"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Ans: 是不是可以这么理解，动态规划有无后效性，而机器学习并不能保证有此特性。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "3. Can you catch up at least 3 problems which could solved by Dynamic Programming? "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Ans: 寻找最短路径；资源分配问题；非线性规划问题"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "4. Can you catch up at least 3 problems wich could sloved by Edit Distance? "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Ans: 拼写纠错；机器翻译；实体共指\n",
    "\n",
    "参考网页地址：https://www.cnblogs.com/xiongzaiqiren/p/4997947.html"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "5. Please summarize the three main features of Dynamic Programming, and make a concise explain for each feature. "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Ans:  \n",
    "1.无后效性：给定某一个阶段，在这一个阶段以后过程的发展不受这阶段以前各段状态的影响。  \n",
    "2.最优子结构：大问题的最优解可以由小问题的最优解推出"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "6. What's the disadvantages of Dynamic Programming? (You may need search by yourself in Internet)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Ans:  \n",
    "1.没有统一的标准模型；  \n",
    "2.数值方法求解时存在维数灾"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### (Optinal) Finish the k-person-salesman problem:\n",
    "\n",
    "    ----这个需要重新找个时间做"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "import random\n",
    "import matplotlib.pylab as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "latitudes = [random.randint(-100, 100) for _ in range(20)]\n",
    "longitude = [random.randint(-100, 100) for _ in range(20)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x11da1c588>"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAD6CAYAAACoCZCsAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAEkpJREFUeJzt3VGIneWdx/HvP5rFKctmoo5oBloXhNyYhrATKTRgzBJzEzWd9CIXLuIWcrX0ImVgXVZ6syUtuSoIgUAXisjerElo04tYjV7IUsOEbKKEBr0YMaO4I3ZU6NS1+t+L857NzPFMMied95z3nOf7gcH3POcc3r/PzDm/vM/7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tl8/5j5vap2vRyAAYxltMZuZrmbkrM3cBl4GLVU3H2+2Z2YQ5Dd1qakw/LhcRu4DbM/M7wN/QWkq8SX3ayH5r69J/99Gcvuu04vcK7KSBfdvlc/4HmtunN9XIABjmW0xGxDeABzLzMq0/3IMRcT4iXmzIv2K61dS4fqx8CPy82m7/rTapT5vab22d/dekvuu0ojbg72lw37Y/57T6uKl9elONDIBV3NItJgdgL9fvc/AO8GxmPkTrX18PD6yq67rV1MR+JDPfzszzEfE94CvgJZrVp43st7Yu/fd7mtN3nTp/r9M0uG+5/jlv0t9jz5o+E3i5breT/OsubYP2GHCy2p4D3lq2fc8A6uk0x9druumtOgclIh4Hfgg8lpl/jog5mtOnje23tuX9R+uGTP9dPTVHM/4e2+ZY+XvdQbP7tv05n6M5f489G6YjgMbfYrI6/NtN65AV4AhwKCI2AA9y/Q9lkLrV1Kh+bIuIe4EZYH9mflY1N6lPG9lvbV36r0l916mzth/R0L7t+Jw3uU9vapgC4AVgMlq3k/yY1oevW9sg7QSuZOafqsfPAU8DbwCnMvPKwCq7rltNTevHtqdoHVafra6w+Eea1adN7be2Ff0H/JHm9F2nFb9X4Bc0t2+Xf86b9PfYMyeCSVKhhukIQJK0jgwASSqUASBJhTIAJKlQBoAkFcoAkKRCGQCSVKj/A9+HGHaH+3x8AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(latitudes, longitude)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "给定一个初始点 𝑃, 已经 𝑘个车辆，如何从该点出发，经这 k 个车辆经过所以的点全部一次，而且所走过的路程最短?\n",
    "\n",
    "例如："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "chosen_p = (-50, 10)\n",
    "chosen_p2 = (1, 30)\n",
    "chosen_p3 = (99, 15)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x11dbbd470>"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAD6CAYAAACoCZCsAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAEyRJREFUeJzt3V+IXvWdx/H3N5rFkaWZqCPqgKbgkhvTEHYiBQPGLJqbaNOxF4Iu4hZytXTBEqjbld6sxJKrgiAEulAk7M1qQqsXsRplkaWGCbNGCQ31YlIzSnfERss6df3z3YvnTDPz+Ewyz8yc55zznPcLhpzn9zzT8+1vZs7H8+f3+0VmIklqnw1VFyBJqoYBIEktZQBIUksZAJLUUgaAJLWUASBJLWUASFJLGQCS1FIGgCS11NVVF3A5N9xwQ27ZsqXqMiSpUU6fPv1hZo5d6XO1DoAtW7YwNTVVdRmS1CgRcX4ln/MSkCS1lAEgSS1lAEhSSxkAktRS6xoAEbExIn5VbF8TES9GxFsR8Vx0fK1tPfcvSVq5dQuAiBgBTgP3Fk2PABcyczuwuWjv1SZpGcenZ7nr6ZN880cvcdfTJzk+PVt1SRoi6xYAmTmfmd8CLhRNe4BfF9sngXuWaZPUw/HpWZ544W1mL86TwOzFeZ544W1DQOumzHsA1wMfF9ufANct07ZERByIiKmImJqbmyuxPKneDp84x/znXy5pm//8Sw6fOFdRRfXkWdLqlRkAHwKbiu1NxetebUtk5pHMnMjMibGxKw5kk4bW+xfn+2pvI8+S1qbMA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Ub8+/MvfKZ3+rLT/ehzjBn58q20ALGNVy0wOyL1cWt/gXeDJzLyTzn+p3V1RTcvVUos+y8zfZeapiPgu8BXw8jL1Dlot+mexHn31W6rvp8W6f26T1KwPCwt/p3X4Pes28ONbmQvClKHXkpJ/3aOtCvcDLxTbM8A7i7ZvrKCeBTN8vZYrLs05KBHxAPAD4P7M/CIiZqi+72rTP4st7is6iyv9d/HWDNX+ji3UsPjntoMa9iGX/k5nqP73rNvAj29NOwOo5TKTxenjbjqnaACPAw9FxAbgDi79olWhVy2V9xlARNwEHAT2ZeafiuY69F0t+mexHn1Vh35arLueH1K/Plz8d1q3/oMKjm9NC4CjwHh0lpT8iE7n9GobtJ3A2cz8c/H6GeAx4E3gWGaeraCmBb1qqUOfATxK5/T7RPEkxj8sU++g1aV/FlvSV8CnVN9Piy35uQE/p359uPjvtA6/Z90GfnxzIJgktVTTzgAkSevEAJCkljIAJKmlDABJaikDQJJaygCQpJYyACSppf4fkfy9lvHOOAIAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(latitudes, longitude)\n",
    "plt.scatter([chosen_p[0]], [chosen_p[1]], color='r')\n",
    "plt.scatter([chosen_p2[0]], [chosen_p2[1]], color='r')\n",
    "plt.scatter([chosen_p3[0]], [chosen_p3[1]], color='r')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "shuro"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
